package org.example.mybatis.controller;

import org.example.mybatis.po.User;
import org.example.mybatis.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 季舟
 * @Date 2025-02-06 13:17
 */
@RestController
public class UserController {

    @Resource
    private UserService userService;


    @GetMapping("user/{userName}")
    public User queryUserByUserName(@PathVariable String userName){
        return userService.queryUserByUserName(userName);
    }
}
